<template>
  <div class="proRight">
    <TabNav @transferTab="getCmponentName" :subNav="subnav"></TabNav>
    <div class="tableInfor">
      <div :is="item.components" v-show="index==Clients_current_seclected" :text="item.text" :key="item.id" v-for="(item,index) in tabList" :proid="item.dataId" :subNav="subnav"></div>
    </div>
  </div>
</template>
<script>
  import TabNav from '@/components/public/tabNav'
  import ClientsProDefault from '@/components/clients/clients_pro_default'
  import ClientsProNew from '@/components/clients/clients_pro_new'
  import ClientsProEdit from '@/components/clients/clients_pro_edit'
  export default {
    data(){
      return {
        tabList:'',
        item:'客户资料',
        componentName:'ClientsProDefault',
        cur:0,
      }
    },
    props:['subnav'],
    computed:{
      Tab_List(){
        return this.$store.state.clients.tabList;
      },
      Clients_current_seclected(){
        return this.$store.state.clients.curSeclected
      },
    },
    methods:{
      getCmponentName(item,num){
        this.componentName = item;
      }
    },
    mounted(){
      var self = this;
      self.tabList = self.Tab_List;
    },
    components:{
      TabNav,
      ClientsProDefault,
      ClientsProNew,
      ClientsProEdit
    }
  }
</script>
